function webControl(command, type, pin, value) {
	var xmlhttp = new XMLHttpRequest()
	xmlhttp.open("GET",
				 "http://cafuuchino1.f3322.net:9002/webcontrol?command=" + command
				 + "&type=" + type + "&pin=" + pin + "&value=" + value, true)
	xmlhttp.onreadystatechange = function () {
		if (xmlhttp.readyState === 4) {
			if (xmlhttp.status === 200) {
				if (xmlhttp.response === "200") {
					toastItem.show("操作成功！")
				}
				console.log(xmlhttp.response)
			} else {
				toastItem.show("数据获取失败！请检查网络连接设置")
			}
		}
	}
	xmlhttp.send()
}
function powerSwitch(type) {
	if (type) {
		power_state_data_label.text = "正常运行"
		toastItem.show("设备已开启！")
	} else {
		power_state_data_label.text = "离线"
		toastItem.show("设备已关闭！")
	}
}
